﻿-var statuses = ViewData["statuses"] as List<StatusInfo>
-var statusid = ViewData.ContainsKey("statusid") ? (int)ViewData["statusid"] : 0
%h3 Бланки:
%ul.statusfilterlist.rightfilterlist
  -foreach(var s in statuses)
    %li{class=(s.Id == statusid) ? "state selected" : "state"}    
      %a{href="#", onclick=String.Format("return statusIdChange(this, {0})", s.Id)}
        =string.Format("{0} ({1})", s.Name, s.OrdersCount)
    -if (s.SubStatuses != null && s.SubStatuses.Count > 0)          
      -foreach(var sb in s.SubStatuses)
        %li{class=(sb.Id == statusid) ? "state selected sub" : "state sub"}
          %a{href="#", onclick=String.Format("return statusIdChange(this, {0})", sb.Id)}
            =string.Format("{0} ({1})", sb.Name, sb.OrdersCount)                         